using UnityEngine;

public class EnemyState_幽魂_站立 : EnemyStateBase_幽魂
{
	public override void OnEnter()
	{
		_Mono._Ani.Play("站立");
		_Mono._Rb2D.velocity = Vector2.zero;
		if (_Mono._Is追击中)
		{
			_Timer = Random.Range(0.4f, 0.6f);
		}
		else
		{
			_Timer = Random.Range(1.5f, 2f);
		}
	}

	public override void OnExit()
	{
	}

	public override void OnUpdate()
	{
		_Timer -= Time.deltaTime;
		if (_Timer <= 0f)
		{
			if (_Mono._Is追击中)
			{
				_Mono.ChangeState(StateType_Enemy_幽魂.追击);
			}
			else
			{
				_Mono.ChangeState(StateType_Enemy_幽魂.散步);
			}
		}
	}
}
